In HVM domain, MA_Transmit function in tcgbios sometimes become an
error (TCG_NO_RESPONSE). The cause of the error is not to make
connection of QEMU and TPMD instance within a timeout of MA_Transmit
function.
Before the MA_Transmit function was called, the attached patch
corrected so that connection of QEMU and TPMD might be completed.
Signed-off-by: Kouichi YASAKI <yasaki.kouichi@jp.fujitsu.com>
memset(s->buffer.buf,0,sizeof(s->buffer.buf));
register_savevm("tpm-tis", 0, 1, tpm_save, tpm_load, s);
+
+ for (c = 0; !IS_COMM_WITH_VTPM(s) && (c < 5); c++) {
+ open_vtpm_channel(s);
+ sleep(1);
+ }
}
/****************************************************************************/